package com.pie4cloud.pie.dmz.entty;

import lombok.Data;
import org.apache.commons.codec.digest.DigestUtils;

import java.io.Serializable;

@Data
public class FileInfo implements Serializable {
	/**
     * 文件路径
	 */
	private String filePath;
	/**
	 * dmz路径
	 */
	private String dmzPath;
	/**
	 * 目标路径
	 */
	private String targetPath;
	/**
	 * 文件名
	 */
	private String fileName;

	/**
	 * 目标名称
	 */
	private String targetFileName;
	/**
	 * 文件名MD5
	 */
	private String md5FileName;
	/**
	 * 文件长度
	 */
	private long fileLength;
	/**
	 * 文件当前块号
	 */
	private int blockIndex;
	/**
	 * 文件总块数
	 */
	private int blockCount;
	/**
	 * 文件块内容
	 */
	private byte[] content;
	/**
	 * 文件块MD5
	 */
	private String md5Content;

	private String ftpAddress;

	private String ftpUserName;

	private String ftpPwd;

	private Integer ftpPort;

	private Long ftpId;

/*	public FileInfo(String fileName, long fileLength, int blockCount, int blockIndex, byte[] content) {
		this.fileName = fileName;
		this.fileLength = fileLength;
		this.blockCount = blockCount;
		this.blockIndex = blockIndex;
		this.content = content;
		this.md5Content = content == null ? null : DigestUtils.md5Hex(content);
		this.md5FileName = DigestUtils.md5Hex(fileName + fileLength);

	}*/
}
